﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace Tradex.Operations {
    
    /// <summary>
    /// The event args for the LogEntryCreated event.
    /// </summary>
    public sealed class LogEntryCreatedEventArgs : EventArgs {

        /// <summary>
        /// Public constructor taking all values.
        /// </summary>
        /// <param name="logEntry"></param>
        public LogEntryCreatedEventArgs(LogEntry logEntry) {
            if (logEntry == null) {
                throw new ArgumentException("value can not be null", "logEntry");
            }
            Contract.EndContractBlock();

            LogEntry = logEntry;
        }

        /// <summary>
        /// The new LogEntry.
        /// </summary>
        public LogEntry LogEntry { get; private set; }

        /// <inheritdoc />
        public override string ToString() {
            return LogEntry.ToString();
        }

    }

}
